console.log('a');

setTimeout(() => {
  console.log('b');

  Promise.resolve().then(() => {
    console.log('b2');
  });
});

new Promise((resolve) => {
  console.log('c');

  setTimeout(() => {
    console.log('d');

    resolve();
  });
}).then(() => {
  console.log('e');
});
